﻿@model MediaAdmin.Controllers.JobController.CreateJobModel

@{
    ViewBag.Title = "Create new Azure Media Services job";
}

<h2>Create new Azure Media Services job</h2>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)

    <fieldset>
        <legend>CreateJobModel</legend>

        <div class="editor-label">
            @Html.LabelFor(model => model.Name)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Name)
            @Html.ValidationMessageFor(model => model.Name)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.AssetList)
        </div>
        <div class="editor-field">
            @Html.DropDownListFor(model => model.AssetId, new SelectList(Model.AssetList, "Id", "Name")) 
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.PerformEncoding)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.PerformEncoding)
            @Html.ValidationMessageFor(model => model.PerformEncoding)
            @Html.DropDownListFor(model => model.EncodingPresetName, new SelectList(Model.Presets)) 
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.PerformSmooth)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.PerformSmooth)
            @Html.ValidationMessageFor(model => model.PerformSmooth)
            @Html.DropDownListFor(model => model.SmoothPresetName, new SelectList(Model.Presets)) 
        </div>

        <div class="editor-label">
            <a href="http://msdn.microsoft.com/en-us/library/windowsazure/hh973624.aspx">?</a> | @Html.LabelFor(model => model.PerformHLS)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.PerformHLS)
            @Html.ValidationMessageFor(model => model.PerformHLS)
            @Html.DropDownListFor(model => model.HLSPresetName, new SelectList(Model.Presets)) 
            <small>decrypt (media services bug workaround)</small> @Html.EditorFor(model => model.DecryptHLS)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.PerformThumbnailing)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.PerformThumbnailing)
            @Html.ValidationMessageFor(model => model.PerformThumbnailing)
            @Html.DropDownListFor(model => model.ThumbnailPresetName, new SelectList(Model.Presets)) 
        </div>
        
        
        <p>
            <input type="submit" value="Create" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
